import 'package:flutter/material.dart';
import 'package:flutter_magic_planet/model/video_chapter.dart';
import 'package:get/get.dart';

class MainLogic extends GetxController {
  final scaffoldKey = GlobalKey<ScaffoldState>();
  final int id = 28854905;
  var selectedIndex = 0.obs;
  var videoChapters = <VideoChapter>[].obs;
  final PageController pageController = PageController(
    initialPage: 0,
    keepPage: true,
  );

  @override
  void onInit() {
    super.onInit();
  }

  setTabSelected(int index) {
    selectedIndex.value = index;
    pageController.animateToPage(
      index,
      duration: Duration(milliseconds: 500),
      curve: Curves.ease,
    );
  }
}
